package cn.wildfire.chat.app.extendsion.classes;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * Create by HEKE, 2019/8/16 16:33
 * TODO 国家区号获取结果对象
 */
public class RegionRet implements Parcelable {

    public String code;
    public String message;
    public ArrayList<Region> regionArrayList;

    public RegionRet() {
        super();
    }

    protected RegionRet(Parcel in) {
        code = in.readString();
        message = in.readString();
        regionArrayList = in.createTypedArrayList(Region.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(code);
        dest.writeString(message);
        dest.writeTypedList(regionArrayList);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<RegionRet> CREATOR = new Creator<RegionRet>() {
        @Override
        public RegionRet createFromParcel(Parcel in) {
            return new RegionRet(in);
        }

        @Override
        public RegionRet[] newArray(int size) {
            return new RegionRet[size];
        }
    };

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public ArrayList<Region> getRegionArrayList() {
        return regionArrayList;
    }

    public void setRegionArrayList(ArrayList<Region> regionArrayList) {
        this.regionArrayList = regionArrayList;
    }
}
